﻿using System;

class Program
{
    static void Main()
    {
        int count = 0; // 素数计数器
        Console.WriteLine("101到200之间的素数：");

        for (int num = 101; num <= 200; num++)
        {
            bool isPrime = true;
            int sqrt = (int)Math.Sqrt(num); // 计算平方根

            for (int i = 2; i <= sqrt; i++)
            {
                if (num % i == 0)
                {
                    isPrime = false;
                    break;
                }
            }

            if (isPrime)
            {
                Console.Write(num + " ");
                count++;
            }
        }

        Console.WriteLine("\n总共有 " + count + " 个素数。");
    }
}